package com.terana.lbs.marketing.web.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tarena.lbs.pojo.marketing.dos.MarketingActivityDO;
import com.tarena.lbs.pojo.marketing.po.ActivityPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ActivityMapper extends BaseMapper<ActivityPO> {

    @Select("select * from marketing_activity where id=#{id}")
    MarketingActivityDO selectActivityById(Integer activityId);

    @Select("select * from marketing_activity where FIND_IN_SET (#{shopId},shop_ids)")
    List<MarketingActivityDO> selectActivitiesById(Integer shopId);
}
